home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Miami / MiamiSDK / netinclude / netinet / igmp.h < prev    next >
C/C++ Source or Header  |  1997-12-04  |  2KB  |  67 lines

  1. #ifndef _NETINET_IGMP_H_
  2. #define _NETINET_IGMP_H_
  3.  
  4. #ifndef _SYS_TYPES_H_
  5. #include <sys/types.h>
  6. #endif
  7.  
  8. #ifndef _NETINET_IN_H_
  9. #include <netinet/in.h>
  10. #endif
  11.  
  12. /*
  13.  * IGMP packet format.
  14.  */
  15. struct igmp {
  16.     u_char        igmp_type;    /* version & type of IGMP message  */
  17.     u_char        igmp_code;    /* subtype for routing msgs        */
  18.     u_short        igmp_cksum;    /* IP-style checksum               */
  19.     struct in_addr    igmp_group;    /* group address being reported    */
  20. };                    /*  (zero for queries)             */
  21.  
  22. #define IGMP_MINLEN             8
  23.  
  24. /*
  25.  * Message types, including version number.
  26.  */
  27. #define IGMP_HOST_MEMBERSHIP_QUERY   0x11    /* Host membership query    */
  28. #define IGMP_HOST_MEMBERSHIP_REPORT  0x12    /* Old membership report    */
  29. #define IGMP_DVMRP             0x13    /* DVMRP routing message    */
  30. #define IGMP_PIM             0x14    /* PIM routing message        */
  31.  
  32. #define IGMP_HOST_NEW_MEMBERSHIP_REPORT 0x16    /* New membership report    */
  33.  
  34. #define IGMP_HOST_LEAVE_MESSAGE      0x17    /* Leave-group message        */
  35.  
  36. #define IGMP_MTRACE_RESP         0x1e   /* traceroute resp. (to sender) */
  37. #define IGMP_MTRACE             0x1f   /* mcast traceroute messages    */
  38.  
  39. #define IGMP_MAX_HOST_REPORT_DELAY   10     /* max delay for response to    */
  40.                         /* query (in seconds)        */
  41.  
  42. #define IGMP_TIMER_SCALE     10        /* denotes that the igmp->timer filed */
  43.                     /*specifies time in tenths of seconds */
  44.  
  45. /*
  46.  * States for the IGMPv2 state table
  47.  */
  48. #define IGMP_DELAYING_MEMBER                     1
  49. #define IGMP_IDLE_MEMBER                         2
  50. #define IGMP_LAZY_MEMBER                         3 
  51. #define IGMP_SLEEPING_MEMBER                     4 
  52. #define IGMP_AWAKENING_MEMBER                    5 
  53.  
  54. /*
  55.  * We must remember whether the querier is an old or a new router.
  56.  */
  57. #define IGMP_OLD_ROUTER                          0
  58. #define IGMP_NEW_ROUTER                          1
  59.  
  60. /*
  61.  * Revert to new router if we haven't heard from an old router in
  62.  * this amount of time.
  63.  */
  64. #define IGMP_AGE_THRESHOLD                 540 
  65.  
  66. #endif /* _NETINET_IGMP_H_ */
  67.